<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>点击实现字符串变大写</title>
    <script src="../js/vue.js"></script>

    <style>
        .main{
            width: 200px;
            height: 200px;
            margin: auto;
            background-color: lightblue;
            overflow: hidden;
        }
        .show_content{
            width: 180px;
            height: 100px;
            line-height: 100px;
            background-color: lightcyan;
            margin: auto;
            margin-top: 20px;
            text-transform: uppercase;
        }
        input{
            outline: none;
            display: block;
            width: 140px;
            height: 32px;
            margin: auto;
            margin-top: 20px;
        }
        input:focus::placeholder{
            opacity: 0;
        }
    </style>
</head>
<body>
    <div class="main">
        <div class="show_content">
            {{msg}}
        </div>
        <input type="text" placeholder="输入要变大的内容" @input="change" />

    </div>

    <script>
        let app = new Vue({
            el:".main",
            data:{
                msg:""
            },
            methods:{
                change(e){
                    console.log(e.target.value);
                    this.msg = e.target.value
                }
            }
            
        })
    </script>
</body>
</html>